package edu.xust.MetadataGenerator.domain;

import java.util.LinkedList;
import java.util.List;

import com.google.gson.annotations.Expose;

public class API {
	private static final long id = Table.generateId();

	@Expose
	private String name;

	@Expose
	private String doc;
	
	@Expose 
	private String _return;
	
	@Expose
	private List<APIParam> params;

	public API(){
		name = "doSomething";
		doc = "My method";
		_return = "Result";
		params = new LinkedList<APIParam>();
	}
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name.replace(" ", "");
	}

	public String getDoc() {
		return doc;
	}

	public void setDoc(String doc) {
		this.doc = doc;
	}

	public String getReturn() {
		return _return;
	}

	public void setReturn(String _return) {
		this._return = _return;
	}

	public List<APIParam> getParams() {
		return params;
	}

	public void setParams(List<APIParam> params) {
		this.params = params;
	}

	public static long getId() {
		return id;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return name;
	}
	
	
}
